Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link sigchat to existing Signal account #465

Merged
merged 53 commits into from
Jan 8, 2024
Merged

Conversation

nworbnhoj
Copy link
Contributor

@nworbnhoj nworbnhoj commented Dec 19, 2023

Linking sigchat to an existing Signal Account involves:

  1. establishing a tls connection to the Signal Provisioning websocket server
  2. obtaining a uuid via the websocket
  3. displaying a qr-code on Precursor (containing the uuid and a pub_key)
  4. scanning the qr-code with the primary Signal device
  5. obtaining device registration via the websocket
  6. completing the registration processing

steps 2, 3, 5 and 6 require libsignal

Refinements are made to lib/tls to facilitate presenting the tls trust modal to the user ONLY when none of the required CA's are trusted.

Note that the sigchat device-link process is temporarily hard coded to the Staging Service Environment (rather than the Live Service Environment). This means that during development/testing we will need to create a Primary Signal Account in the Staging Environment. This can be achieved with a spare SIM and signal-cli.

alternatives are presented to user as required
- prompt the user for the Signal host server
- probe the host for the tls Certificate Authorities chain of trust
- allow the user to trust 1 or more Certificate Authorities
- create a new Account in the pddb
- create an Account Manager to coordinate the Link
- request a name for the device being linked (ie default 'xous')
- call Manager.link()
- on failure - delete the pddb Account record
@nworbnhoj nworbnhoj changed the title Sigchat Link sigchat to existing Signal account Dec 19, 2023
@nworbnhoj nworbnhoj marked this pull request as draft December 19, 2023 20:22
@nworbnhoj nworbnhoj marked this pull request as ready for review December 26, 2023 05:29
@nworbnhoj
Copy link
Contributor Author

This PR is now at a sensible point for review - before it gets any bigger
There are some refinements on this base - but libsignal is now the critical component to get sigchat linked to an existing Signal account

@nworbnhoj
Copy link
Contributor Author

For user testing purposes - sigchat can be fully reset with shellchat:

  • net tls deleteall
  • pddb deletedict sigchat.account
  • sleep coldboot

@nworbnhoj
Copy link
Contributor Author

Note that the sigchat device-link process is temporarily hard coded to the Staging Service Environment (rather than the Live Service Environment). This means that during development/testing we will need to create a Primary Signal Account in the Staging Environment. This can be achieved with a spare SIM and signal-cli.

Copy link
Member

@bunnie bunnie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will merge as soon as the stability PR has run the CI gauntlet. sorry this took a while..holidays, plus distracted with IRIS.

@bunnie
Copy link
Member

bunnie commented Jan 7, 2024

Waiting for #475 to close before merging this, but ideally this is merged before #477 is applied (I think that's the right call, at least).

I think #475 is getting close, just waiting on @xobs to cut a draft of environment variable passing.

@nworbnhoj
Copy link
Contributor Author

Thanks for the note - and no problem - and no rush.

I am using this hiatus to make some long overdue progress on another unrelated project.

Very grateful for the progress on libsignal.

@bunnie
Copy link
Member

bunnie commented Jan 8, 2024

alright, the fire drill is over -- let's merge this and see how it goes

@bunnie bunnie merged commit f196bcf into betrusted-io:main Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants